<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><s:text name="content.list.title"/></title>
	<%@ include file="/common/meta.jsp"%>
	<%@ include file="/common/common.jsp"%>
</head>
<body>
<div id="wrapper">
	<div id="main_box">
	<div class="curmb"><s:text name="your.site.position"/>:<a href="${ctx}/main.action"><s:text name="homepage"/></a><span>></span><s:text name="content.title"/></div>
	<div class="listtit" id="listtit"><p><span><strong><s:text name="content.list.title"/>><s:text name="content.audit.title"/></strong></span></p></div>
	<s:form action="content-auditcontent.action" id="action_form">
	<div class="searchbox">
		<table class="searchTable">
			<tbody id="searchTable">
				<tr>
					<td class="text"><label for="qry_contentStatus"><s:text name="content.contentStatus"/>: </label></td>
					<td class="input"><s:select id="contType" list="dicContentType2" value="content.contentStatus" name="content.contentStatus" cssClass="selectClass" listKey="dictionaryKey" listValue="dictionaryValue" headerKey=" " headerValue="---请选择---"/></td>
					<td><input type="button" value="<s:text name="query"/>" class="btnsearch" id="search_btn"/></td>
				</tr>
			</tbody>
		</table>
		<div class="clear"></div>
	</div>
	<div class="listoperate">
		<span>
			<input type="button" value="<s:text name="anti-selection"/>" class="btnlist2" id="top_anti_btn"/>
		</span>
	</div>

	<div class="listbox" id="listbox">
		<table class="listgrid" id="listbox">
			<tbody>
				<tr>
					<th><input type="checkbox" name="all" id="all_check"/></th>			
					<th><s:text name="content.contextType"/></th>
					<th><s:text name="content.contentTitle"/></th>		
					<th><s:text name="updater"/></th>
					<th><s:text name="content.updateTime"/></th>		
					<th><s:text name="publisher"/></th>
					<th><s:text name="content.contentStatus"/></th>
					<th><s:text name="content.cmsCategory"/></th>
					<th><s:text name="operate"/></th>
				</tr>
				<s:iterator value="page.result">
					<tr>
					<td <s:if test="contentStatus.equals(\"4\")">title="文章已锁定"</s:if> ><input type="checkbox"  value="<s:property value="contentId"/>" id="<s:property value="contentTitle"/>" alt="<s:property value="contentStatus"/>" <s:if test="contentStatus.equals(\"4\")">disabled="disabled"</s:if><s:else>  name="key"</s:else> /></td>
					<td><s:text name="content.contextType.%{contextType}"/></td>
					<td class="talign_l w30p" name="contentTitle"><s:property value="contentTitle"/>&nbsp;</td>					
					<td><s:property value="updateRealName"/>&nbsp;</td>
					<td><s:date name="updateTime" format="yyyy-MM-dd HH:mm:ss" />&nbsp;</td>
					<td><s:property value="publishRealName"/>&nbsp;</td>
					<td><s:property value="%{getName(contentStatus,'CONTENT_STATUS')}"/>&nbsp;</td>
					<td><s:property value="%{getCatName(contentId)}"/>&nbsp;</td>
						<td>
							<a href="#this" onclick="goAudit('<s:property value="contentId"/>','1','<s:property value="contextType"/>')"><s:property value="%{getOperate(contentStatus)}"/></a>
						</td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		
	</div>
	<div class="listoperateb ">  
		<div class="pager fr"><z:page numberNav="true" selectPageSize="true" input="true" id="ctrl"/></div>
		<span>
			<input type="button" value="<s:text name="anti-selection"/>" class="btnlist2" id="bottom_anti_btn"/>
		</span>
	</div>
</s:form>
</div>
</div>
</body>
</html>
<script type="text/javascript">

	////文章id拼接 
	function inputvalue(){
		var d = $("#listbox input"), i = 0, j = d.length, str = "";
	   for ( ; i < j ; i ++ ) {
				str += (d[i].type == "checkbox" && d[i].id != "totalCheck" && d[i].checked == true ) ? d[i].value + "," : "";
		};	
		return (str.slice(0,-1)); 
	};
	
	actionName = "content";	
	confirmStr = "<s:text name="delete.confirm"/>";
	chiocenothing = "<s:text name="chiocenothing"/>";
	$(function(){
 		$("#top_anti_btn").click(antiSelect);
 		$("#bottom_anti_btn").click(antiSelect);
		$("#search_btn").click(search);
		$("#all_check").click(selAll);
	});
	
	function search(){
		var contType = $("#contType").val();
		//$("#action_form").attr("action","${ctx}/content/content-auditcontent.action?content.contentStatus="+contType);
		$("#action_form").submit();
		/* $.post("${ctx}/content/content-auditcontent.action?content.contentStatus="+contType,function(data){
			
		}) */
	}
	
	function goAudit(id,flag,type){
		type2= type.toLowerCase();
		var str = type.substring(0,1);
		var type3 = str.toLowerCase()+type.substring(1,type.length);
		document.location.href=type2+"-input.action?orig=input&contextType=0&"+type3+".category.categoryId=<s:property value="content.category.categoryId"/>&"+type3+".contentId="+id+"&cflag="+flag+"&indexflag="+1;
	}
	$(function(){
		if ($.browser.msie && ($.browser.version == "6.0") && !$.support.style) {
			$('#main_box').width($('#main_box').width()-25);
		}
	});
	</script>